package com.xiaoc.bulldozer.common.service.impl;

import java.util.List;
import javax.annotation.Resource;
import org.springframework.stereotype.Service;
import com.xiaoc.bulldozer.common.dao.SpRuleMapper;
import com.xiaoc.bulldozer.common.dto.SpRuleQueryDto;
import com.xiaoc.bulldozer.common.model.SpRule;
import com.xiaoc.bulldozer.common.service.SpRuleService;

/**
 * SpRule Service 实现类
 * 
 * @author wj
 * 
 * @date 2019-05-06 11:24:46
 */
@Service("spRuleService")
public class SpRuleServiceImpl implements SpRuleService {

    @Resource
    private SpRuleMapper spRuleMapper;

    @Override
    public Integer getSpRuleCountByCondition(SpRuleQueryDto spRuleQueryDto) {
        return spRuleMapper.getSpRuleCountByCondition(spRuleQueryDto);
    }

    @Override
    public List<SpRule> getSpRuleListByCondition(SpRuleQueryDto spRuleQueryDto) {
        return spRuleMapper.getSpRuleListByCondition(spRuleQueryDto);
    }

    @Override
    public SpRule getSpRuleById(Integer id) {
        return spRuleMapper.getSpRuleById(id);
    }

    @Override
    public List<SpRule> getAllSpRuleList() {
        return spRuleMapper.getAllSpRuleList();
    }
    
    @Override
    public void save(SpRule spRule) {
        spRuleMapper.save(spRule);
    }

    @Override
    public void update(SpRule spRule) {
        spRuleMapper.update(spRule);
    }

    @Override
    public void deleteById(Integer id) {
        spRuleMapper.deleteById(id);
    }

}
